home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / matmul.z / matmul
Text File  |  1998-10-30  |  4KB  |  95 lines

  1. MATMUL(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      MMAATTMMUULL - Performs matrix multiplication of numeric or logical matrices
  6.  
  7. SSYYNNOOPPSSIISS
  8.      MMAATTMMUULL (([MMAATTRRIIXX__AA==]_m_a_t_r_i_x__a,, [MMAATTRRIIXX__BB==]_m_a_t_r_i_x__b))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The MMAATTMMUULL intrinsic function performs matrix multiplication
  18.      operations on numeric or logical matrices.  It accepts the following
  19.      arguments:
  20.  
  21.      _m_a_t_r_i_x__a  Must be of numeric type (integer, real, or complex) or of
  22.                logical type.  It must be array valued and of rank one or
  23.                two.
  24.  
  25.      _m_a_t_r_i_x__b  Must be of numeric type if _m_a_t_r_i_x__a is of numeric type and
  26.                of logical type if _m_a_t_r_i_x__a is of logical type.  It must be
  27.                array valued and of rank one or two.  If _m_a_t_r_i_x__a has rank
  28.                one, _m_a_t_r_i_x__b must have rank two.  If _m_a_t_r_i_x__b has rank one,
  29.                _m_a_t_r_i_x__a must have rank two.  The size of the first (or
  30.                only) dimension of _m_a_t_r_i_x__b must equal the size of the last
  31.                (or only) dimension of _m_a_t_r_i_x__a.
  32.  
  33.      MMAATTMMUULL is a transformational function.  The name of this intrinsic
  34.      cannot be passed as an argument.
  35.  
  36. RREETTUURRNN VVAALLUUEESS
  37.      The result type, type parameter, and shape are as follows.  If the
  38.      arguments are of numeric type, the type and kind type parameter of the
  39.      result are determined by the types of the arguments.  If the arguments
  40.      are of type logical, the result is of type logical with the kind type
  41.      parameter of the arguments.  The shape of the result depends on the
  42.      shapes of the arguments, as follows:
  43.  
  44.      * If _m_a_t_r_i_x__a has shape (_n, _m) and _m_a_t_r_i_x__b has shape (_m, _k), the
  45.        result has shape (_n, _k).
  46.  
  47.      * If _m_a_t_r_i_x__a _h_a_s _s_h_a_p_e (_m) and _m_a_t_r_i_x__b has shape (_m, _k), the result
  48.        has shape (_k).
  49.  
  50.      * If _m_a_t_r_i_x__a has shape (_n, _m) and _m_a_t_r_i_x__b has shape (_m), the result
  51.        has shape (_n).
  52.  
  53.      Element (_i, _j) of the result has the value
  54.      SSUUMM((MMAATTRRIIXX__AA((_i,,::))**MMAATTRRIIXX__BB((::,,_j)))) if the arguments are of numeric type
  55.      and has the value AANNYY((MMAATTRRIIXX__AA((_i,,::))..AANNDD..MMAATTRRIIXX__BB((::,,_j)))) if the
  56.      arguments are of logical type.
  57.  
  58.      Element (_j) of the result has the value SSUUMM((MMAATTRRIIXX__AA((::))**MMAATTRRIIXX__BB((::,,_j))))
  59.      if the arguments are of numeric type and has the value
  60.      AANNYY((MMAATTRRIIXX__AA((::))..AANNDD..MMAATTRRIIXX__BB((::,,_j)))) if the arguments are of logical
  61.      type.
  62.  
  63.      Element (_i) of the result has the value SSUUMM((MMAATTRRIIXX__AA((_i,,::))**MMAATTRRIIXX__BB((::))))
  64.      if the arguments are of numeric type and has the value
  65.      AANNYY((MMAATTRRIIXX__AA((_i,,::))..AANNDD..MMAATTRRIIXX__BB((::)))) if the arguments are of logical
  66.      type.
  67.  
  68. EEXXAAMMPPLLEESS
  69.      Let AA and BB be the matrices
  70.         | 1 2 3 |
  71.         | 2 3 4 |
  72.      and
  73.         | 1 2 |
  74.         | 2 3 |
  75.         | 2 4 |
  76.  
  77.  
  78.      Let XX and YY be the vectors [[11,, 22]] and [[11,, 22,, 33]].
  79.  
  80.      * The result of MMAATTMMUULL((AA,, BB)) is the matrix-matrix product AABB with the
  81.        value
  82.          | 11 20 |
  83.          | 16 29 |
  84.  
  85.      * The result of MMAATTMMUULL((XX,, AA)) is the vector-matrix product XXAA with the
  86.        value [[55,, 88,, 1111]].
  87.  
  88.      * The result of MMAATTMMUULL((AA,, YY)) is the matrix-vector product AAYY with the
  89.        value [[1144,, 2200]].
  90.  
  91. SSEEEE AALLSSOO
  92.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  93.      printed version of this man page.
  94.  
  95.